/* TailwindCSS 基础样式 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* 确保全屏高度 */
#root {
  min-height: 100vh;
}

/* Semi Design 组件样式覆盖 */
.semi-layout {
  min-height: 100vh;
}

.semi-layout-sider {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.semi-layout-header {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.semi-layout-content {
  padding: 24px;
  background-color: #f5f5f5;
}

/* 表格样式优化 */
.semi-table {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 卡片样式优化 */
.semi-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 按钮样式优化 */
.semi-button {
  border-radius: 6px;
}

/* 输入框样式优化 */
.semi-input {
  border-radius: 6px;
}

.semi-select {
  border-radius: 6px;
}

/* 模态框样式优化 */
.semi-modal {
  border-radius: 8px;
}

/* 导航菜单样式 */
.semi-navigation-item {
  border-radius: 6px;
  margin: 2px 8px;
}

.semi-navigation-item-selected {
  background-color: rgba(var(--semi-blue-5), 0.1) !important;
  color: var(--semi-color-primary) !important;
}

/* 表单验证错误样式 */
.semi-form-field-error .semi-input {
  border-color: var(--semi-color-danger) !important;
}

.semi-form-field-error .semi-input:focus {
  border-color: var(--semi-color-danger) !important;
  box-shadow: 0 0 0 2px rgba(var(--semi-color-danger-rgb), 0.2) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .semi-layout-content {
    padding: 16px;
  }
  
  .semi-table {
    font-size: 12px;
  }
}

/* 加载状态 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* 状态标签样式 */
.status-tag {
  font-weight: 500;
  border-radius: 4px;
}

/* 代码块样式 */
.code-block {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 4px 8px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: #24292e;
}

/* 树形结构缩进 */
.tree-indent {
  display: inline-block;
  width: 20px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 自定义动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* 悬停效果 */
.hover-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.hover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
